<?php
/************************FoxPHP威客系统************************/
/*                                                            */
/*  FoxPHP.Com (C)2006-2016 FoxPHP Inc.                       */
/*  This is NOT a freeware, use is subject to license terms   */
/*  FoxPHP威客系统是商业软件,使用于商业用途请购买授权         */
/*  V3.0 2016.3                                               */
/*  foxphp@aliyun.com                                         */
/*  http://www.foxphp.com                                     */
/*                                                            */
/**************************************************************/

namespace Admin\Model;
use Think\Model;

class AuthGroupModel extends AdminModel {
	
	//字段过滤-----------------------------------------------------------------------------------------------
	//protected $insertFields = array('title','status','rules','icon','color','allowdomainname','allowlogin','allowskillnumber','allowsendsms','feetype','taskfee','SecurityForm');
	//protected $updateFields = array('title','status','rules','icon','color','allowdomainname','allowlogin','allowskillnumber','allowsendsms','feetype','taskfee','SecurityForm');
	
	
	//字段检查-----------------------------------------------------------------------------------------------
	protected $_validate = array(
		array('title','require','请输入名称！'),
	);
	
	//数据过滤-----------------------------------------------------------------------------------------------
	function FormatData(){
		$data['id']=I('get.id',0,'int');
		$data['title']=I('post.title','','string');
		$data['rules']=ExplodeStrArr(implode(',',$_POST['checkbox']));
		$data['icon']=I('post.icon','','string');
		$data['color']=I('post.color','','string');
		$data['allowdomainname']=I('post.allowdomainname',0,'int');
		$data['allowlogin']=I('post.allowlogin','','int');
		$data['allowskillnumber']=I('post.allowskillnumber',0,'int');
		$data['allowsendsms']=I('post.allowsendsms',0,'int');
		$data['feetype']=I('post.feetype',0,'int');
		$data['taskfee']=I('post.taskfee',0,'int');
		$data['addservice']=I('post.addservice',0,'int');
		$data['adddraft']=I('post.adddraft',0,'int');
		$data['taskunionfee']=I('post.taskunionfee',0,'int');
		$data['checkservice']=I('post.checkservice',0,'int');
		$data['successunionfee']=I('post.successunionfee',0,'int');
		$data['status']=I('post.status',0,'int');
		$data['SecurityForm']=I('post.SecurityForm');
		return $data;
	}
	
}

?>